package com.zx.idc.backend.gui;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.DependsOn;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author rxliuli
 *
 */
@SpringBootApplication(scanBasePackages = "com.zx.idc", exclude = DruidDataSourceAutoConfigure.class)
@EnableMongoRepositories(basePackages = "com.zx.idc.ds.**.repository.**")
@EnableTransactionManagement
@EnableConfigurationProperties
@DependsOn("initialConfig")
public class BackendApplication {
    public static void main(String[] args) {
        System.setProperty("sun.net.client.defaultConnectTimeout", String
            .valueOf(10000));// （单位：毫秒）
        System.setProperty("sun.net.client.defaultReadTimeout", String
            .valueOf(10000)); // （单位：毫秒）
        SpringApplication.run(BackendApplication.class, args);
    }
}